package com.campus.app.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.campus.commons.entity.FeedType;
import com.campus.commons.entity.Feedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.commons.utils.MyPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 问题反馈 Mapper 接口
 * </p>
 *
 * @author Rin
 * @since 2020-12-24
 */
@Repository
public interface FeedbackMapper extends BaseMapper<Feedback> {

//    List<Feedback> getFeedbackssssssss();//@Param("p") MyPage<Feedback> myPage

    List<Feedback> getFeeds(MyPage myPage);

   default Feedback getOne(Integer id) {
       QueryWrapper<Feedback> queryWrapper = new QueryWrapper<>();
       queryWrapper.eq("id", id);
       return selectOne(queryWrapper);
    }

    List<Feedback> getAll();
}
